<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ page import="com.model.*,java.util.*"%>
<%@ include file="/header.jsp" %>
<% request.setAttribute("ctx",request.getContextPath()); %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
</head>
<body>	
	
	<center>
	<a href="${ctx}/user/addUser.jsp"><h4>增加管理员</h4></a>
	<a href="${ctx}/message/manager?func=all"><h4>显示留言</h4></a>
	</center>
	<br>
	<table border="1" align="center">
		<tr>
			<td>登录名</td>
			<td>密码</td>
			<td>用户类别</td>
			<td>操作</td>
		</tr>
		<c:forEach items="${list}" var="obj">		
		<tr>
			<td>${obj.username}</td>
			<td>${obj.password}</td>
			<td>
			<c:if test="${obj.roleId==1}">
			      管理员
			</c:if>
			<c:if test="${obj.roleId==2}">
			     普通用户
			</c:if>			
		 </td>
		  <td>
			<a href="${ctx}/user/manager?func=delete&id=${obj.id}">删除</a>
			<a href="${ctx}/user/editUserPassword.jsp">修改</a>
			</td>
		</tr>
		</c:forEach>
	
	</table>
	<center>
	 <p>
	   <a href="${ctx}/user/manager?func=logout"><h4>退出</h4></a>
	  </p>
	 </center>
</body>
</html>
